package com.clouddot.baipai.infrastructure.environment.initial;


import android.content.Intent;
import android.content.pm.PackageManager;

import com.clouddot.baipai.infrastructure.environment.Env;
import com.clouddot.baipai.infrastructure.environment.Environment;
import com.clouddot.baipai.model.beam.getClassType.getClassTypeResponse;
import com.clouddot.baipai.model.beam.getVersionInfo.XMLBean;
import com.clouddot.baipai.ui.util.ThreadPool.ThreadPoolFactory;
import com.clouddot.baipai.ui.util.ToastUtil;


public class InitialAppType extends InitialBase
{
	private Environment Environment;

	public InitialAppType(Environment Environment)
	{
		super(Environment);
		this.Environment = Environment;
	}

	@Override
	public String getName()
	{
		return "初始化升级类";
	}

	@Override
	public void initial() throws Exception
	{
		super.initial();

		ThreadPoolFactory.getThread().execute(new Runnable() {
			@Override
			public void run() {
				getClassTypeResponse response = Env.getAppPresenter().getClassType();
				if (response.isSuccess()) {
					Env.getAppContext().DevicePath = response.DevicePath;
					Env.getAppContext().CardReadType = response.CardReadType;
				}
			}
		});



	}

	@Override
	public void reinitial() throws Exception {
		super.reinitial();

	}
}
